<template>
    <div>
        <pagetitle></pagetitle>
        <el-card>
            <el-form :model="pageData" class="formbox" label-width="140px" :disabled="formDisabled" label-position="right">
                <div class="formboxitem">
                    <div class="title">开放平台及供应商</div>
                    <el-form-item label="开放平台名称：">
                        <el-input v-model="pageData.companyName" class="inputs" placeholder="请输入开放平台名称"></el-input>
                    </el-form-item>
                    <el-form-item label="版本号：">
                        <el-input v-model="pageData.companyName" class="inputs" placeholder="请输入版本号"></el-input>
                        <span class="formTip">*请规范输入版本号</span>
                    </el-form-item>
                    <el-form-item label="设备供应商名称：">
                        <el-select v-model="pageData.value" class="inputs" placeholder="请选择设备供应商">
                            <el-option label="data" value="item.value" />
                        </el-select>
                        <span class="formTip">*从已添加的供应商列表中选择</span>
                    </el-form-item>
                </div>
                <div class="formboxitem">
                    <div class="title">标准采用情况</div>
                    <el-form-item label="标准号检索：">
                        <div class="selectorbtn">
                            <el-select v-model="pageData.value" class="selectorbtn_select selectorbtn_select_option" placeholder="请选择标准类型">
                                <el-option label="国家标准" value="item.value" />
                                <el-option label="地方标准" value="item.value" />
                                <el-option label="行业标准" value="item.value" />
                            </el-select>
                            <el-input
                                v-model="pageData.companyName"
                                class="selectorbtn_select_center_input"
                                placeholder="从标准资源中检索标准的引用标准"
                            ></el-input>
                            <div class="selectorbtn_btn">检索</div>
                        </div>
                        <span class="formTip">*从标准资源库中检索</span>
                    </el-form-item>
                    <el-form-item label="标准内容：">
                        <el-table :data="[{}]" style="width: 100%" class="configurationtable">
                            <el-table-column prop="name" label="序号" width="48">1</el-table-column>
                            <el-table-column label="标准类型"></el-table-column>
                            <el-table-column label="标准号"></el-table-column>
                            <el-table-column label="标准名称"></el-table-column>
                            <el-table-column label="状态"></el-table-column>
                            <el-table-column label="发布日期"></el-table-column>
                            <el-table-column label="实施日期"></el-table-column>
                            <el-table-column label="操作" width="120">
                                <template #default>
                                    <el-button type="primary" size="small" link>查看文档</el-button>
                                    <el-button type="primary" size="small" link>删除</el-button>
                                </template>
                            </el-table-column>
                        </el-table>
                    </el-form-item>
                </div>
                <div class="formboxitem">
                    <div class="title">服务器信息</div>
                    <el-form-item label="服务器地址：">
                        <el-input v-model="pageData.companyName" class="inputs" placeholder="请输入服务器地址"></el-input>
                        <span class="formTip">*输入物联网开放平台服务器地址</span>
                    </el-form-item>
                </div>
                <div class="formboxitem">
                    <div class="title">通讯协议信息</div>
                    <el-form-item label="节点类型：">
                        <el-select v-model="pageData.value" class="inputs" placeholder="网关设备">
                            <el-option label="data" value="item.value" />
                        </el-select>
                        <span class="formTip">*根据物联网模块入网类型选择</span>
                    </el-form-item>
                    <el-form-item label="接入网关协议：">
                        <el-select v-model="pageData.value" class="inputs" placeholder="Modbu协议">
                            <el-option label="data" value="item.value" />
                        </el-select>
                        <span class="formTip">*本模块采用的应用层协议的名称</span>
                    </el-form-item>
                    <el-form-item label="数据格式：">
                        <el-select v-model="pageData.value" class="inputs" placeholder="遗传RTC">
                            <el-option label="data" value="item.value" />
                        </el-select>
                        <span class="formTip">*ICA标准数据格式（ALInk JOSN）</span>
                    </el-form-item>
                    <el-form-item label="入网方式：">
                        <el-select v-model="pageData.value" class="inputs" placeholder="请选择入网方式">
                            <el-option label="data" value="item.value" />
                        </el-select>
                        <span class="formTip">*选择本设备入网方式，可多选</span>
                    </el-form-item>
                </div>
                <div class="formboxitem">
                    <div class="title">发布单位情况</div>
                    <el-form-item label="平台发布单位：">
                        <el-input v-model="pageData.companyName" disabled class="inputs" placeholder=""></el-input>
                        <span class="formTip">*自动填入当前团队，不可修改</span>
                    </el-form-item>
                    <el-form-item label="标准公开程度：">
                        <el-radio-group v-model="pageData.createUserPost" size="large">
                            <div class="radiobutton" v-for="(item, index) in cardType" :key="index">
                                <el-radio-button :label="item" />
                            </div>
                        </el-radio-group>
                        <span class="formTip">*完全公开，所有人可以查看；不公开，自己查看，其他人无权查看</span>
                    </el-form-item>
                </div>
                <div class="formboxitem">
                    <div class="title">供应商市场</div>
                    <el-form-item label="计量单位：">
                        <el-input v-model="pageData.companyName" class="inputs" placeholder="请输入开放平台的计量单位"></el-input>
                        <span class="formTip">*请输入开放平台的计量单位</span>
                    </el-form-item>
                    <el-form-item label="产品单位：">
                        <el-input v-model="pageData.companyName" class="inputs" placeholder="请输入开放平台的单价">
                            <template #append>元</template>
                        </el-input>
                        <span class="formTip">*请输入开放平台的单价</span>
                    </el-form-item>
                    <el-form-item label="供应商设备地址：">
                        <el-input v-model="pageData.companyName" class="inputs" placeholder="请输入开放平台介绍网址"></el-input>
                        <span class="formTip">*请输入开放平台介绍网址</span>
                    </el-form-item>
                    <el-form-item label="开放平台说明：">
                        <el-input v-model="pageData.companyName" :rows="4" type="textarea" resize="none" placeholder="请输入开放平台说明"></el-input>
                    </el-form-item>
                </div>
                <div class="formboxitem">
                    <el-button class="submitbtn" text bg>返回</el-button>
                    <el-button class="submitbtn" text bg>新增</el-button>
                </div>
            </el-form>
        </el-card>
    </div>
</template>
<script lang="ts" setup>
// import mars3d from "@/components/mars3d.vue";
import { ref } from "vue";
import { useRouter, useRoute } from "vue-router";
// import mars3d from "@/views/editorMap/index.vue";

import { companyInfo } from "@/api/team";
const router = useRouter();
const route = useRoute();

const cardType = ref(["完全公开", "不公开"]);
const pageData: any = ref({});

console.log(route);
// 页面类型
const pageType = route.query;
const formDisabled = ref(false);
if (pageType.type == "1") {
    // 从我的团队页面进入
    formDisabled.value = false;
    // route.meta.title = "创建团队";
} else if (pageType.type == "2") {
    // 从加入团队页面搜索进入
    formDisabled.value = true;
    // route.meta.title = "团队详情";
} else if (pageType.type == "3") {
    // 从加入团队页面我的邀请进入
    formDisabled.value = false;
    // route.meta.title = "团队编辑";
}
const uploadFiles = () => {};
</script>
<!-- <style lang="scss" scoped>
.formbox {
    padding-top: 10px;
    .formboxitem {
        border-bottom: 1px solid #eeeeee;
        // padding-left: 60px;
        padding-bottom: 5px;
        margin-bottom: 30px;
        &:last-child {
            border: none;
        }
        .submitbtn {
            width: 88px;
        }
        .title {
            font-size: 18px;
            color: #333333;
            font-weight: 500;
            margin-bottom: 30px;
        }
        .inputs {
            width: 500px;
            margin-right: 15px;
        }

        span {
            font-size: 12px;
            color: #999999;
            margin-left: -5px;
        }
        // .uploadcertificateTitle {
        //     color: #666666;
        //     font-size: 12px;
        //     margin-top: 10px;
        // }
        // .classfiy {
        //     width: 500px;
        //     min-height: 32px;
        //     border-radius: 5px;
        //     opacity: 1;
        //     border: 1px solid var(--el-border-color);
        // }
        .selectorbtn {
            display: flex;
            justify-content: flex-start;
            align-items: center;
            margin-right: 20px;
            .selectorbtn_select {
                width: 452px;
            }
            .selectorbtn_select_option {
                width: 124px;
            }
            .selectorbtn_select_center_input {
                width: 328px;
            }
            .selectorbtn_btn {
                width: 48px;
                height: 32px;
                border: 1px solid var(--el-border-color);
                border-radius: 0 5px 5px 0;
                text-align: center;
                line-height: 32px;
                cursor: pointer;
                color: #333333;
                font-size: 14px;
            }
        }
    }
}
</style> -->
